package cn.wolfcode.rbac.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class Permission extends BaseDomain {
    private String name;
    private String expression;

    public String getJson() {
        Map map = new HashMap();
        map.put("id", id);
        map.put("name", name);
        map.put("expression", expression);
        return JSON.toJSONString(map);
    }
}
